package com.rd.student.jiaji.class4.suyan.zrrd.day14;
//import com.zrrd.day08.D;
import java.util.Date;

public class Tesat {
    public static void main(String[] args) throws InterruptedException {
        //alt+enter自动导包
        Date date=new Date();
        System.out.println(date);
        System.out.println(date.getYear()+1900+"年"+date.getMonth()+"月"+date.getHours()+"小时");
        System.out.println(date.getMonth());
        System.out.println(date.getHours());
        //等待一会
        try{
            Thread.sleep(30000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        Date date1=new Date();
        System.out.println(date1);
        if (date1.before(date)){
            System.out.println("date1在date之前");
        }else {
            System.out.println("date在date1之前");
        }

    }
}
